WindowInsetsCompat

Describes a set of insets for window content.

WindowInsetsCompats are immutable and may be expanded to include more inset types in the future. To adjust insets, use one of the supplied clone methods to obtain a new WindowInsetsCompat instance with the adjusted properties.

Constructors

Link copied to clipboard
constructor(@Nullable src: WindowInsetsCompat)
Constructs a new WindowInsetsCompat, copying all values from a source WindowInsetsCompat.

Types

Link copied to clipboard
class Builder
Builder for WindowInsetsCompat.
Link copied to clipboard
class Type
Class that defines different types of sources causing window insets.

Properties

Link copied to clipboard
A WindowInsetsCompat instance for which isConsumed returns true.

Functions

Link copied to clipboard
Returns a copy of this WindowInsets with the cutout fully consumed.
Link copied to clipboard
Returns a copy of this WindowInsets with the stable insets fully consumed.
Link copied to clipboard
Returns a copy of this WindowInsets with the system window insets fully consumed.
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
Returns the display cutout if there is one.
Link copied to clipboard
open fun getInsets(typeMask: Int): Insets
Returns the insets of a specific set of windows causing insets, denoted by the typeMask bit mask of Types.
Link copied to clipboard
Returns the insets a specific set of windows can cause, denoted by the typeMask bit mask of Types, regardless of whether that type is currently visible or not.
Link copied to clipboard
Returns the mandatory system gesture insets.
Link copied to clipboard
Returns the bottom stable inset in pixels.
Link copied to clipboard
Returns the left stable inset in pixels.
Link copied to clipboard
Returns the right stable inset in pixels.
Link copied to clipboard
Returns the stable insets in pixels.
Link copied to clipboard
Returns the top stable inset in pixels.
Link copied to clipboard
Returns the system gesture insets.
Link copied to clipboard
Returns the bottom system window inset in pixels.
Link copied to clipboard
Returns the left system window inset in pixels.
Link copied to clipboard
Returns the right system window inset in pixels.
Link copied to clipboard
Returns the system window insets in pixels.
Link copied to clipboard
Returns the top system window inset in pixels.
Link copied to clipboard
Returns the tappable element insets.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun hasInsets(): Boolean
Returns true if this WindowInsets has any non-zero insets.
Link copied to clipboard
Returns true if this WindowInsets has nonzero stable insets.
Link copied to clipboard
Returns true if this WindowInsets has nonzero system window insets.
Link copied to clipboard
open fun inset(@IntRange(from = 0) left: Int, @IntRange(from = 0) top: Int, @IntRange(from = 0) right: Int, @IntRange(from = 0) bottom: Int): WindowInsetsCompat
Returns a copy of this instance inset in the given directions.
Link copied to clipboard
open fun isConsumed(): Boolean
Check if these insets have been fully consumed.
Link copied to clipboard
open fun isRound(): Boolean
Returns true if the associated window has a round shape.
Link copied to clipboard
open fun isVisible(typeMask: Int): Boolean
Returns whether a set of windows that may cause insets is currently visible on screen, regardless of whether it actually overlaps with this window.
Link copied to clipboard
open fun replaceSystemWindowInsets(left: Int, top: Int, right: Int, bottom: Int): WindowInsetsCompat
Returns a copy of this WindowInsets with selected system window insets replaced with new values.
Link copied to clipboard
Return the source WindowInsets instance used in this WindowInsetsCompat.
Link copied to clipboard